<!DOCTYPE html>
<html lang="en">
   <head>
      <meta charset="UTF-8">
      <title>静态方法</title>
   </head>
   <body>
      <script>
         const o = {name: 'xiaohua', age: 10}
         console.log(Object.keys(o))
         console.log(Object.values(o))

         const arr = [1, 2, 3, 4, 5]
         const sum = arr.reduce((pre, cur) => {
            return pre + cur
         })
         console.log(sum)
         const sum1 = arr.reduce((pre, cur) =>{
            return pre + cur
         },20)
         console.log(sum1)
      </script>
   </body>
</html>